package com.example.ppjoke;

import android.app.Application;

import com.alibaba.android.arouter.launcher.ARouter;
import com.bumptech.glide.Glide;
import com.example.base_application_sdk.BaseApplication;
import com.example.imgload_sdk.GlideApp;
import com.example.ppjoke.frame.dynamicnav.AppConfig;

public class App extends BaseApplication {

    public static App instance;

    public static App getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        ARouter.openDebug();
        ARouter.openLog();
        ARouter.init(this);
        GlideApp.get(this).clearMemory();
        instance=this;
        AppConfig.getInstance();
    }

    @Override
    public void onTrimMemory(int level) {
        super.onTrimMemory(level);
        if (level==TRIM_MEMORY_RUNNING_LOW){
            Glide.get(this).clearMemory();
        }
    }
}
